home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
551-575
/
disk_562
/
intuisup
/
render
/
source.lzh
/
render.h
< prev
Wrap
C/C++ Source or Header
|
1991-10-19
|
3KB
|
107 lines
/*************************************
* *
* Render v2.0 *
* by Torsten Jürgeleit in 05/91 *
* *
* Defines, structs and protos *
* *
*************************************/
#ifndef RENDER_H
#define RENDER_H
/* Defines for render info flags */
#define RENDER_INFO_FLAG_INNER_WINDOW (1 << 0) /* use upper left corner of inner window as location (0,0) */
#define RENDER_INFO_FLAG_BACK_FILL (1 << 1) /* fill window back ground with different color */
/* Defines for open window flags */
#define OPEN_WINDOW_FLAG_CENTER_WINDOW (1 << 0) /* center window on screen */
#define OPEN_WINDOW_FLAG_RENDER_PENS (1 << 1) /* use render pens for detail and backfill pen */
/* Defines for render images */
#define MAX_RENDER_IMAGES 11
#define IMAGE_ARROW_LEFT 0
#define IMAGE_ARROW_RIGHT 1
#define IMAGE_ARROW_UP 2
#define IMAGE_ARROW_DOWN 3
#define IMAGE_KNOB_UNSELECTED 4
#define IMAGE_KNOB_SELECTED 5
#define IMAGE_CHECK_UNSELECTED 6
#define IMAGE_CHECK_SELECTED 7
#define IMAGE_CYCLE 8
#define IMAGE_COUNT_LEFT 9
#define IMAGE_COUNT_RIGHT 10
#define IMAGE_ARROW_WIDTH 9
#define IMAGE_ARROW_HEIGHT 5
#define IMAGE_ARROW_DEPTH 1
#define IMAGE_KNOB_WIDTH 18
#define IMAGE_KNOB_HEIGHT 9
#define IMAGE_KNOB_DEPTH 2
#define IMAGE_CHECK_WIDTH 13
#define IMAGE_CHECK_HEIGHT 7
#define IMAGE_CHECK_DEPTH 1
#define IMAGE_CYCLE_WIDTH 16
#define IMAGE_CYCLE_HEIGHT 9
#define IMAGE_CYCLE_DEPTH 2
#define IMAGE_COUNT_WIDTH 8
#define IMAGE_COUNT_HEIGHT 5
#define IMAGE_COUNT_DEPTH 1
#define IMAGE_HORIZ_OFFSET 4
#define IMAGE_VERT_OFFSET 2
#define INTUISUP_DATA_END 0 /* end marker for data arrays */
#define MAX_RENDER_COLORS 16 /* max screen colors to look at */
/* Structures */
struct RenderInfo {
USHORT ri_ScreenWidth;
USHORT ri_ScreenHeight;
UBYTE ri_ScreenDepth;
UBYTE ri_WindowBorderTop;
UBYTE ri_WindowBorderLeft;
UBYTE ri_WindowBorderRight;
UBYTE ri_WindowBorderBottom;
UBYTE ri_HighlightPen;
UBYTE ri_ShadowPen;
UBYTE ri_TextPen1;
UBYTE ri_TextPen2;
UBYTE ri_BackPen;
USHORT ri_Flags;
struct TextFont *ri_TextFont;
struct TextAttr ri_TextAttr;
struct Image ri_Images[MAX_RENDER_IMAGES];
USHORT *ri_ImageData;
ULONG ri_ImageDataSize;
};
/* Global prototypes */
struct RenderInfo *get_render_info(struct Screen *screen, USHORT flags);
VOID free_render_info(struct RenderInfo *ri);
struct Window *open_window(struct RenderInfo *ri, struct NewWindow *nw,
USHORT flags);
VOID clear_render_window(struct RenderInfo *ri, struct Window *win,
USHORT left_edge, USHORT top_edge, USHORT width, USHORT height);
SHORT calc_color_difference(SHORT color1, SHORT color2);
/* Global pragmas */
#pragma regcall(get_render_info(a0,d0))
#pragma regcall(free_render_info(a0))
#pragma regcall(open_window(a0,a1,d0))
#pragma regcall(clear_render_window(a0,a1,d0,d1,d2,d3))
#pragma regcall(calc_color_difference(d0,d1))
#endif